package com.model.factory;

/**
 * @author: cxt
 * @time: 2022/2/21
 */
public class SimpleFactory {

    // 获取对象
    public static Frame getShape(String shapeType) {
        if (shapeType == null) {
            return null;
        }
        if (shapeType.equalsIgnoreCase("RECTANGLE")) {
            return new Rectangle();
        }
        return null;
    }
}
